using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace nDeveloper.UI.Windows.IDE
{
    public class Query : BaseDb
    {
        public DataSet ExecuteCommandDataSet(string command, bool enableSqlParser)
        {
            con.HandleErrors = false;
            con.EnableSqlParser = enableSqlParser;
            return con.ExecuteDataSet(command, CommandType.Text);
        }

        public DataTable ExecuteCommandDataTable(string command, bool enableSqlParser)
        {
            con.HandleErrors = false;
            con.EnableSqlParser = enableSqlParser;
            return con.ExecuteDataTable(command, CommandType.Text);
        }

        public int ExecuteCommandNoQuery(string command)
        {
            con.HandleErrors = false;
            con.EnableSqlParser = false;
            return con.ExecuteNonQuery(command, CommandType.Text);
        }
    }
}
